Option Explicit
Sub Q_Sample053()
    Dim myStr      As String
    Dim myPtn      As String
    Dim myRpStr      As String
    myPtn = "www\.[\w\.]+tw"                                            'w˦
    'wjMH
    myStr = "DrMaster Publishing}http://www.drmaster.com.twC"
    myRpStr = "www.moug.net" 
    Debug.Print RegExpReplace(myPtn, myStr, myRpStr)
End Sub

Function RegExpReplace(myPtn As String, _
                       myStr As String, myRpStr As String) As String
    ']wޥζMicrosoft VBScript Regular Expressions 5.5
    Dim myRegExp As VBScript_RegExp_55.RegExp
    Set myRegExp = New VBScript_RegExp_55.RegExp
    With myRegExp
        .Pattern = myPtn                                 'w˦
        .IgnoreCase = False                            'Ϥjpgr
        .Global = True                                    'jMӦr
       RegExpReplace = .Replace(myStr, myRpStr)
    End With
    Set myRegExp = Nothing                      '
End Function
